#ifndef DEACONSWIDGET_H_
#define DEACONSWIDGET_H_
#include <QWidget>
#include <QIntValidator>
#include "ui_deaconswidget.h"
#include "Youth.h"

class DeaconsWidget : public QWidget, 
                            private Ui::DeaconsWidget
{
	Q_OBJECT
	
public:
	DeaconsWidget(QWidget *parent=0);
	virtual ~DeaconsWidget();
    
    void load(YouthPtr youth);
    
public slots:
	void on_name_textChanged(const QString& string);
	void on_phone_textChanged(const QString& string);
	
	void on_address_textChanged();
	void on_birthdate_dateChanged(const QDate& date);
	
	void updateCompletions();
	
private:
	YouthPtr m_youth;
	QIntValidator m_validator;
	void installValidator(QWidget* parent);
	void updateTenure();
	
private slots:
	void loadPriesthood();	
	void on_priesthood1_textChanged(const QString& i_percent);
	void on_priesthood2_textChanged(const QString& i_percent);
	void on_priesthood3_textChanged(const QString& i_percent);
	void on_priesthood4_textChanged(const QString& i_percent);
	void on_priesthood5_textChanged(const QString& i_percent);
	void on_priesthood6_textChanged(const QString& i_percent);
	void on_priesthood7_textChanged(const QString& i_percent);
	void on_priesthood8_textChanged(const QString& i_percent);
	void on_priesthood9_textChanged(const QString& i_percent);
	void on_priesthood10_textChanged(const QString& i_percent);
	
	void loadFamily();	
	void on_family1_textChanged(const QString& i_percent);
	void on_family2_textChanged(const QString& i_percent);
	void on_family3_textChanged(const QString& i_percent);
	void on_family4_textChanged(const QString& i_percent);
	void on_family5_textChanged(const QString& i_percent);
	void on_family6_textChanged(const QString& i_percent);
	void on_family7_textChanged(const QString& i_percent);
	
	void loadQuorum();	
	void on_quorum1_textChanged(const QString& i_percent);
	void on_quorum2_textChanged(const QString& i_percent);
	void on_quorum3_textChanged(const QString& i_percent);
	void on_quorum4_textChanged(const QString& i_percent);
	void on_quorum5_textChanged(const QString& i_percent);
	void on_quorum6_textChanged(const QString& i_percent);
	void on_quorum7_textChanged(const QString& i_percent);

	void loadEducation();	
	void on_education1_textChanged(const QString& i_percent);
	void on_education2_textChanged(const QString& i_percent);
	void on_education3_textChanged(const QString& i_percent);
	void on_education4_textChanged(const QString& i_percent);
	void on_education5_textChanged(const QString& i_percent);
	void on_education6_textChanged(const QString& i_percent);
	void on_education7_textChanged(const QString& i_percent);
	void on_education8_textChanged(const QString& i_percent);
	void on_education9_textChanged(const QString& i_percent);
	void on_education10_textChanged(const QString& i_percent);
	void on_education11_textChanged(const QString& i_percent);
	void on_education12_textChanged(const QString& i_percent);
	void on_education13_textChanged(const QString& i_percent);

	void loadPhysical();	
	void on_physical1_textChanged(const QString& i_percent);
	void on_physical2_textChanged(const QString& i_percent);
	void on_physical3_textChanged(const QString& i_percent);
	void on_physical4_textChanged(const QString& i_percent);
	void on_physical5_textChanged(const QString& i_percent);
	void on_physical6_textChanged(const QString& i_percent);
	void on_physical7_textChanged(const QString& i_percent);
	void on_physical8_textChanged(const QString& i_percent);
	void on_physical9_textChanged(const QString& i_percent);
	void on_physical10_textChanged(const QString& i_percent);
	void on_physical11_textChanged(const QString& i_percent);
	void on_physical12_textChanged(const QString& i_percent);
	void on_physical13_textChanged(const QString& i_percent);

	void loadSpiritual();	
	void on_spiritual1_textChanged(const QString& i_percent);
	void on_spiritual2_textChanged(const QString& i_percent);
	void on_spiritual3_textChanged(const QString& i_percent);
	void on_spiritual4_textChanged(const QString& i_percent);
	void on_spiritual5_textChanged(const QString& i_percent);
	void on_spiritual6_textChanged(const QString& i_percent);
	void on_spiritual7_textChanged(const QString& i_percent);
	void on_spiritual8_textChanged(const QString& i_percent);
	void on_spiritual9_textChanged(const QString& i_percent);
	void on_spiritual10_textChanged(const QString& i_percent);
	void on_spiritual11_textChanged(const QString& i_percent);
	void on_spiritual12_textChanged(const QString& i_percent);
	void on_spiritual13_textChanged(const QString& i_percent);

	void loadCitizenship();	
	void on_citizenship1_textChanged(const QString& i_percent);
	void on_citizenship2_textChanged(const QString& i_percent);
	void on_citizenship3_textChanged(const QString& i_percent);
	void on_citizenship4_textChanged(const QString& i_percent);
	void on_citizenship5_textChanged(const QString& i_percent);
	void on_citizenship6_textChanged(const QString& i_percent);
	void on_citizenship7_textChanged(const QString& i_percent);
	void on_citizenship8_textChanged(const QString& i_percent);
	void on_citizenship9_textChanged(const QString& i_percent);
	void on_citizenship10_textChanged(const QString& i_percent);
	void on_citizenship11_textChanged(const QString& i_percent);
	void on_citizenship12_textChanged(const QString& i_percent);
	void on_citizenship13_textChanged(const QString& i_percent);

	void loadService();
	void on_service1_textChanged(const QString& i_percent);

	void loadJournal();
	void on_journal1_textChanged(const QString& i_percent);
};

#endif /*DEACONSWIDGET_H_*/
